import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("日期选择器")

    Row {
        spacing: 5
        anchors.centerIn: parent

        Tumbler {
            id: monthTumbler
            width: 100
            model: ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
                    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
        }

        Tumbler {
            id: dayTumbler
            width: 70
            model: 31
        }

        Tumbler {
            id: yearTumbler
            width: 90
            model: ListModel {
                Component.onCompleted: {
                    for (var i = 2020; i <= 2030; ++i)
                        append({value: i.toString()})
                }
            }
            delegate: Text {
                text: value
                horizontalAlignment: Text.AlignHCenter
            }
        }
    }
}
